#ifndef TERRAINDIMENSIONSGUI_H
#define TERRAINDIMENSIONSGUI_H

#include <QtGui/QWidget>

namespace Ui {
    class TerrainDimensionsGUI;
}

class TerrainDimensionsGUI : public QWidget
{
    Q_OBJECT
    Q_DISABLE_COPY(TerrainDimensionsGUI)
    public:
        explicit TerrainDimensionsGUI(QWidget *parent = 0);
        virtual ~TerrainDimensionsGUI();

    public slots:
        void setNewDimensions(float width, float length, float height);
        void widthChanged(double width);
        void lengthChanged(double length);
        void heightChanged(double height);
        void setAspectRatioLock(bool);
    signals:
        void dimensionsChanged(float width,float length,float height);
        void setWidth(double);
        void setLength(double);
        void setHeight(double);
    protected:
        void blockChildrenSignals(bool);
        void updateLastSize();
        virtual void changeEvent(QEvent *e);

    private:
        double lastWidth,lastHeight,lastLength;
        bool mustLockAspectRatio;
        Ui::TerrainDimensionsGUI *m_ui;
};

#endif // TERRAINDIMENSIONSGUI_H
